﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenNETCF.MTConnect;
using System.Net;
using System.Threading;
using System.Diagnostics;
using System.Runtime.InteropServices;

namespace VirtualAgentInfoAdapter
{
    public class InfoAdapter : HostedAdapterBase, IHostedAdapter
    {
        private VirtualAgentDevice m_device;

        public InfoAdapter()
        {
            m_refreshPeriod = 1000;
            m_device = new VirtualAgentDevice(this);
        }

        public override IHostedDevice HostedDevice
        {
            get { return m_device; }
        }

        public override void OnNewAgentInterface()
        {
            AgentInterface.DataItemValueChanged += new EventHandler<DataItemValue>(AgentInterface_DataItemValueChanged);
        }

        protected override void OnPublish()
        {
            base.OnPublish();
            
            UpdateProperties();
        }

        void AgentInterface_DataItemValueChanged(object sender, DataItemValue e)
        {
        }
    }
}
